<?php
/**************************
@Author  : sulwan
@Content : 测试文件
**************************/
include_once(dirname(__file__).'/./init.php');

showIndex();
///*默认执行函数*/
function showIndex() {
	global $config,$_G;
	$Catalog = new Catalog();
	$id = trim(_g('id'));
	//$page = intval(_g('page'))?intval(_g('page')):1;
	$article = $Catalog->getNew($id);
	if(empty($article)){
		exit;
	}
	$classid = $article['classid'];
	$title = $article['title'];
	$topic = $Catalog->lookRoleModule($article['classid']);
	$edu24 = explode(',',$topic);
	$str = nameClassAndId($topic);
	$dir_path = DIR_ROOT.$str.date('Ymd',$article['pubdate']).'/';
	mk_dir($dir_path);
	$dirPath = $dir_path.$id.'.html';
	$article['pubdate'] = date('Y-m-d',$article['pubdate']);
	include template($topic['temparticle']);
	if(CREATEHTML) {
		createhtml($dirPath);
	}
}










?>